;;===============================================================
;; node
;; Mutable node object enabling cyclic references, for the Aho-Corasick automaton.
;; Wraps the Node Java object with basic functionality
;;===============================================================
(ns objects.node
  (:import [objects Node]))

(defn node-make
  (^Node []
    (Node.))
  (^Node [dict]
    (Node. dict))
)

(defn node-get-dict [^Node node]
  (when node
    @node)
)


(defn node-set-dict! [^Node node dict]
  (when node
    (.setDict node dict))
)